//
//  LLProfileViewController.swift
//  WeiBoShiBing
//
//  Created by Bingo on 15/10/27.
//  Copyright © 2015年 Bingo. All rights reserved.
//

import UIKit
import SDWebImage

class LLProfileViewController: LLBaseTableViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        let size = Double(SDImageCache.sharedImageCache().getSize()) / 1000.0 / 1000.0

        let newSize = String(format: "%.2f",arguments: [size])
        
        navigationItem.title = "缓存大小有：\(newSize)M"
       navigationItem.rightBarButtonItem = UIBarButtonItem(title: "清除缓存", style: UIBarButtonItemStyle.Plain, target: self, action: "clear")
    }
    
    func clear(){
        SDImageCache.sharedImageCache().clearDiskOnCompletion { () -> Void in
            print("清除缓存成功")
        }
        
    }
   

}
